package main

import (
	"fmt"
	"reflect"
	"unsafe"
)

func main() {

	var a = "haima"
	var b = `xxxxxx
xxxx 
xxx
`

	fmt.Println(a)
	fmt.Println(b)

	fmt.Println(len(a))

	var c = "我是海马"
	fmt.Printf("len()方法长：%v\n", len(c)) //len()方法长：12
	for i := 0; i < len(c); i++ {       //for循环必须这样写

		//fmt.Printf("", i,)
		fmt.Println(c[i], unsafe.Sizeof(c[i]), reflect.TypeOf(c[i])) //183 1 uint8

		fmt.Printf("编码%d 值	%c\n", c[i], c[i]) //出现乱码
	}

	for index, value := range c {
		println(index, value)
	}

}
